package homework2.exp4;

import java.util.Random;
import java.util.Scanner;



/**
 * @author fengq
 */
public class Test4 {

    public static void main(String[] args) {

        Viper viper = new Viper();
        System.out.println("请输入会员的姓名：");
        Scanner input = new Scanner(System.in);
        viper.setName(input.next());
        System.out.println("请输入会员性别：");
        viper.setSex(input.next());
        System.out.println("请输入会员年龄");
        viper.setAge(input.nextInt());
        System.out.println("创建成功会员成功：");

        Random random = new Random();
        int nums=random.nextInt(10)*1000 +random.nextInt(10)*100+random.nextInt(10)*10+random.nextInt(10);

        viper.setNum(nums);

        System.out.println("会员编号"+viper.getNum());
        System.out.println("会员详细信息：");
        System.out.println(viper.getName()+'\t'+viper.getSex()+'\t'+viper.getAge());

    }
}

